export const ErrType = {
  ERR_NETWORK: '网络异常',
}

export interface ResWrapper<T = unknown> {
  success: boolean
  errCode: number
  errMsg: string
  data: T
}

export interface PageReq {
  current?: number
  size?: number
  orderBy?: string
  orderAsc?: boolean
}

export interface PageRes<T = unknown> {
  current?: number
  size?: number
  total?: number
  records?: T[]
  orderBy?: string
  orderAsc?: boolean
}

export const CommonStates = [
  { label: '启用', value: 'ENABLE', tagType: 'success' },
  { label: '禁用', value: 'DISABLE', tagType: 'danger' },
] as const
export type CommonState = typeof CommonStates[number]['value']
